<T:ViewBase x:Class="WPFExcelReport.TKASTBAT02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>  
    </T:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
        <WrapPanel>
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAMANDANT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAMANDANT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAKANR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAKANR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAKAPOS:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAKAPOS}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAPOS:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAPOS}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAWAKZ:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAWAKZ}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAKUNDNR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAKUNDNR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAWERK:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAWERK}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAABT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAABT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAART:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAART}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAVAR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAVAR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KBAFARBE:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKASTBAT.KBAFARBE}" Width="Auto" />
            </Grid> 
        </WrapPanel>
        <WrapPanel Visibility="{Binding IsKASTBAT,Converter={StaticResource ResourceKey=bv}}">
                <ex:TBASE1></ex:TBASE1>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"  VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding vwKASTBAT}"  
                                    IsSynchronizedWithCurrentItem="True"
                                   SelectedItem="{Binding Path=dwKASTBAT, Mode=TwoWay}"
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
            <DataGrid.Columns> 
                <DataGridTextColumn x:Name="KBAMANDANT"
                                    Binding="{Binding Path=KBAMANDANT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMANDANT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAKANR"
                                    Binding="{Binding Path=KBAKANR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAKANR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAKAPOS"
                                    Binding="{Binding Path=KBAKAPOS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAKAPOS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAPOS"
                                    Binding="{Binding Path=KBAPOS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAPOS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAWAKZ"
                                    Binding="{Binding Path=KBAWAKZ, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAWAKZ}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAKUNDNR"
                                    Binding="{Binding Path=KBAKUNDNR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAKUNDNR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAWERK"
                                    Binding="{Binding Path=KBAWERK, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAWERK}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAABT"
                                    Binding="{Binding Path=KBAABT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAABT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAART"
                                    Binding="{Binding Path=KBAART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAVAR"
                                    Binding="{Binding Path=KBAVAR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAVAR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAFARBE"
                                    Binding="{Binding Path=KBAFARBE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAFARBE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBADESS"
                                    Binding="{Binding Path=KBADESS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBADESS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBACOLORIT"
                                    Binding="{Binding Path=KBACOLORIT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBACOLORIT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBABESCHICH"
                                    Binding="{Binding Path=KBABESCHICH, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBABESCHICH}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAZUSTAND"
                                    Binding="{Binding Path=KBAZUSTAND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAZUSTAND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAVERBR"
                                    Binding="{Binding Path=KBAVERBR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAVERBR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMAEH"
                                    Binding="{Binding Path=KBAMAEH, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMAEH}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMAEHGRP"
                                    Binding="{Binding Path=KBAMAEHGRP, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMAEHGRP}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMAEHFKT"
                                    Binding="{Binding Path=KBAMAEHFKT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMAEHFKT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMEEH"
                                    Binding="{Binding Path=KBAMEEH, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMEEH}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMEEHGRP"
                                    Binding="{Binding Path=KBAMEEHGRP, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMEEHGRP}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMEEHFKT"
                                    Binding="{Binding Path=KBAMEEHFKT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMEEHFKT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBALO"
                                    Binding="{Binding Path=KBALO, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBALO}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAABF"
                                    Binding="{Binding Path=KBAABF, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAABF}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBANET"
                                    Binding="{Binding Path=KBANET, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBANET}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBABRUT"
                                    Binding="{Binding Path=KBABRUT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBABRUT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAPREIS"
                                    Binding="{Binding Path=KBAPREIS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAPREIS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAKOSTEN"
                                    Binding="{Binding Path=KBAKOSTEN, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAKOSTEN}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMGK1"
                                    Binding="{Binding Path=KBAMGK1, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMGK1}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMGK2"
                                    Binding="{Binding Path=KBAMGK2, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMGK2}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMGK3"
                                    Binding="{Binding Path=KBAMGK3, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMGK3}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMGK4"
                                    Binding="{Binding Path=KBAMGK4, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMGK4}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAMGK5"
                                    Binding="{Binding Path=KBAMGK5, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAMGK5}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAARTAEND"
                                    Binding="{Binding Path=KBAARTAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAARTAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBANETAEND"
                                    Binding="{Binding Path=KBANETAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBANETAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAABFAEND"
                                    Binding="{Binding Path=KBAABFAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAABFAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAPRAEND"
                                    Binding="{Binding Path=KBAPRAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAPRAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBABRT"
                                    Binding="{Binding Path=KBABRT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBABRT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAFAK"
                                    Binding="{Binding Path=KBAFAK, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAFAK}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAPART"
                                    Binding="{Binding Path=KBAPART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAPART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBASTUEART"
                                    Binding="{Binding Path=KBASTUEART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBASTUEART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KBAFILLER"
                                    Binding="{Binding Path=KBAFILLER, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KBAFILLER}}"
                                    Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</T:ViewBase> 
 
